Problem:
When you reroute a container, which was already loaded and discharged from a vessel to another vessel, N4 updates the Chargeable Unit Events, UNIT_LOAD and UNIT_DISCH, which was recorded for the first vessel to the second vessel.
Solution:
You must set the update attribute in the bexuObVisitId field to false in the INVBILLING010.xml file as given below and import the XML file in the setting INVBILLING010 (BILLING_UPDATE_EXTRACT_ON_ENTITY_UPDATE) (on page 1). This ensures that even if you reroute a container to a different vessel, N4 does not update the Chargeable Unit Events UNIT_LOAD and UNIT_DISCH recorded for the first vessel to the second vessel.
You must include the following code in the <outbound-fields> element.
<field id="bexuObVisitId" update="false" description="Outbound Visit Id"/>
You must restart the N4 server after loading the updated XML file.